package edu.cuit.canary;

import edu.cuit.canary.config.CustomLoadBalancerConfiguration;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
//import org.springframework.cloud.client.loadbalancer.LoadBalanced;
//import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
//import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClients;
import org.springframework.cloud.openfeign.EnableFeignClients;
//import org.springframework.context.annotation.Bean;
//import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@MapperScan("edu.cuit.canary.mapper")
@EnableDiscoveryClient
@EnableFeignClients
//@LoadBalancerClients(defaultConfiguration = CustomLoadBalancerConfiguration.class) //应用客户端配置的负载均衡器
public class OrderServiceApplication {
    public static void main(String[] args) {
        SpringApplication.run(OrderServiceApplication.class,args);
    }

    /*@Bean @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }*/
}
